{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=264
  Verdict: Accepted
}
uses SysUtils, Math;
 
var
	a:int64;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(a);
if (a=0) or (a=3) or (a=5) or (a=6) or (a>7) then write('YES') else write('NO');
end.